CuDoubleSidedScannerC  1.22
dss_types.h
Go to the documentation of this file.
1 // File Revision
2 // Rev 1.26
3 //
4 // - rel 1.00: first release
5 // - rel 1.01: added support for A6 scanner
6 // - rel 1.04: added WorkingParameter
7 // - rel 1.05: modified ImageColorDepthType; added LedBarChannel; added LedBarLight; added LedBarSetting;
8 // added PaperHeldBackDetectionOpt; added DoubleSheetDetectOpt. Modified ScanParametersStruct.
9 // - rel 1.06: updated WorkingParameter
10 // - rel 1.07: updated ScanParametersToStringA()
11 // - rel 1.08: added LogVerbosity::DSS_LOG_DEEP_DEBUG;
12 // added ScannerCapabilities::bDoubleMotor; changed from BOOL reserved[32] to BOOL reserved[31] to not modify the struct size
13 // - rel 1.09: added ImageFileFormat::Raw and ImageFileFormat::Jpeg_Native
14 // added ImageResolution::RESOLUTION_100_DPI, ImageResolution::RESOLUTION_150_DPI, ImageResolution::RESOLUTION_250_DPI
15 // added ScannerPrintDensity (only for scanners that support void print)
16 // - rel 1.10: added #pragma pack() to restablish the default settings
17 // - rel 1.11: added ScanParametersStruct::nBrightness, to set the image brightness.
18 // - rel 1.12: added ImageFileFormat::Tiff_Comp_Rle, ImageFileFormat::Tiff_Comp_CCITT4, ImageFileFormat::Tiff_Comp_CCITT3, ImageFileFormat::Png, ImageFileFormat::Tiff_Comp_Lzw.
19 // - rel 1.15: added ScannerCapabilities::bMICRDataCMC7Reader
20 // ScannerCapabilities::reserved is now an array of 30 elements.
21 // - rel 1.16: added ScannerCapabilities::bRGBLedBar, ScannerCapabilities::bHardwareDeskewingSupported and ScannerCapabilities::bLedBarPresent.
22 // ScannerCapabilities::reserved is now an array of 27 elements.
23 // - rel 1.18: added DeviceModel struct and a new deviceModel into ScannerDevice struct.
24 // - rel 1.19: added GammaChannel struct and a new deviceModel into ScannerDevice struct.
25 // - rel 1.20: added support for SCAN A4-SE scanner
26 // - rel 1.21: added ScanParametersStruct::nRetryMovementBeforeStartScan : this is, where supported, the number of movement to do before start the scan.
27 // - rel 1.22: added UltrasonicParametersStruct
28 // - rel 1.23: added support for SCAN105 scanner
29 // - rel 1.24: added the log of nRetryMovementBeforeStartScan
30 // - rel 1.25: added CropPrecision, CropParametersStruct and CropParametersToStringA.
31 // - rel 1.26: added support for KUBEIII Scanner; added new ScannerType type.
32 // NOTE: Please DO NOT EDIT THIS FILE
33 
38 
39 
40 #ifndef _DSS_TYPES_H__
41 #define _DSS_TYPES_H__
42 
43 #include "dss_Error.h"
44 
45 #pragma pack(1)
46 
47 // Common define
48 
50 #define MAXCHARBUFFER 256
51 
53 #define DW_MAX_DEVICE_CONNECTED 6
54 
56 #define MAX_PARAM_LOG_STRING 1500
57 
59 typedef char int8;
61 typedef short int16;
63 typedef int int32;
65 typedef unsigned char uint8;
67 typedef unsigned short uint16;
69 typedef unsigned int uint32;
70 
72 typedef uint32 DeviceID;
73 
74 
75 
76 /**********************************************************/
77 // Enum
78 /**********************************************************/
79 
83 typedef enum : uint8
84 {
89 
94 
99 
104 
109 
114 
119 
120 } LogVerbosity;
121 
125 typedef enum : BYTE
126 {
130  NORMAL = 0,
131 
135  LOW = 1,
136 
140  HIGHT = 2,
141 
145  VERYHIGHT = 3,
146 
147 } CropPrecision;
148 
152 typedef enum : BYTE
153 {
158 
163 
168 
169 } FormStanding;
170 
171 
175 typedef enum : BYTE
176 {
181 
186 
191 } FormMovement;
192 
193 
197 typedef enum : WORD
198 {
200  RedChannel8bpp = 0x0108,
201 
204 
206  BlueChannel8bpp = 0x0308,
207 
210 
212  Grey8bpp = 0x0608,
213 
215  RedChannel1bpp = 0x0101,
216 
219 
221  BlueChannel1bpp = 0x0301,
222 
224  BlackAndWhite = 0x0601,
225 
228 
230  Color24bpp = 0x0618,
231 
234 
236  Grey16bpp = 0x0610,
237 
239  Color48bpp = 0x0630,
240 
242 
243 
248 typedef enum : BYTE
249 {
251  SIDE_A = 1,
252 
254  SIDE_B = 2,
255 
258 } ScanSide;
259 
263 typedef enum : BYTE
264 {
267 
270 
273 
274 } GammaChannel;
275 
279 typedef enum : BYTE
280 {
282  Tiff = 0,
283 
285  Bmp = 1,
286 
288  Jpeg = 2,
289 
291  Raw = 3,
292 
295 
298 
301 
304 
306  Png = 8,
307 
310 
312 
313 
317 typedef enum : BYTE
318 {
320  NoPaper = 0,
321 
324 
326  NotAvailable = 0xFF,
327 } SensorStatus;
328 
329 
333 typedef enum : BYTE
334 {
336  A4 = 4,
337 
339  A6 = 6,
340 
342  MM80 = 80,
343 } ScannerType;
344 
348 typedef enum : BYTE
349 {
352 
355 
358 
361 
364 
367 
369  SCAN105 = 7,
370 
373 } DeviceModel;
374 
375 
379 typedef enum : DWORD
380 {
385 
390 
395 
400 
405 
410 
412 
413 
418 typedef enum : DWORD
419 {
422 
425 
428 
431 } LedBarChannel;
432 
436 typedef enum : DWORD
437 {
439  Off = 0,
440 
442  On = 1,
443 
446 
449 } LedBarLight;
450 
451 
455 typedef enum : DWORD
456 {
459 
461  Level1 = 1,
462 
464  Level2 = 2,
465 
467  Level3 = 3,
468 
470  Level4 = 4,
472 
473 
477 typedef enum : DWORD
478 {
481 
485 
486 
490 typedef enum : DWORD
491 {
493  None = 0,
494 
497  LogImage = 0x00000001,
498 
501  BackupLogFiles = 0x00000004,
502 
505  KeepAllLogImages = 0x00000008,
507 
508 
512 typedef enum : DWORD
513 {
517  DENSITY_M50 = 0x30,
518 
522  DENSITY_M37 = 0x31,
523 
527  DENSITY_M25 = 0x32,
528 
532  DENSITY_M12 = 0x33,
533 
538 
542  DENSITY_P12 = 0x35,
543 
547  DENSITY_P25 = 0x36,
548 
552  DENSITY_P37 = 0x37,
553 
557  DENSITY_P50 = 0x38,
558 
564 
565 
566 
567 /****************************** Structures ******************/
568 
572 typedef struct {
574  DWORD dwDeviceID;
575 
577  DWORD dwVid;
578 
580  DWORD dwPid;
581 
583  wchar_t szSerialNumber[MAXCHARBUFFER];
584 
587 
590 
592  BYTE reserved[63];
593 } ScannerDevice;
594 
595 
599 typedef struct
600 {
603 
606 
609 
612 
615 
618 
620  BYTE reserved[64];
621 } LedBarSetting;
622 
626 typedef struct {
629 
632 
635 
638 
640  DWORD dwJpgQuality;
641 
644 
647 
650 
653 
656 
659 
664 
667 
669  BYTE reserved[115];
671 
672 
676 typedef struct {
679 
682 
685 
688 
691 
694 
697 
700 
702  BYTE reserved[128];
704 
708 typedef struct {
709 
710 
714 
728 
739 
741  BYTE reserved[61];
743 
747 typedef struct {
748 
749 
753 
757 
759  BYTE reserved[62];
761 
765 typedef struct {
768 
774 
780 
786 
791  BOOL bCisUp;
792 
797  BOOL bCisDown;
798 
804 
810 
816 
822 
828 
830  BOOL reserved[27]; //
831 
837 
839  BYTE reserved2[31];
841 
842 
843 
850 {
851  return (BYTE)depthType;
852 }
853 
861 static void ScanParametersToStringA(ScanParametersStruct* pParameters, char* szBufferOut, DWORD dwBuffCharSize)
862 {
863  char szApp[MAXCHARBUFFER];
864  ZeroMemory(szApp, sizeof(szApp));
865 
866  if (pParameters == NULL || szBufferOut == NULL)
867  {
868  return;
869  }
870 
871  // Create string
872  strcpy_s(szBufferOut, dwBuffCharSize, "Scanner parameters:\n ");
873 
874  // Add all parameters
875  //
876  // Scan side
877  switch (pParameters->wantedScanSide)
878  {
879  case ScanSide::SIDE_A:
880  {// Add parameter
881  sprintf_s(szApp, MAXCHARBUFFER, " Side A; ");
882  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
883  break;
884  }
885  case ScanSide::SIDE_B:
886  {// Add parameter
887  sprintf_s(szApp, MAXCHARBUFFER, " Side B; ");
888  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
889  break;
890  }
892  {// Add parameter
893  sprintf_s(szApp, MAXCHARBUFFER, " Side A+B; ");
894  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
895  break;
896  }
897  }
898 
899  // Resolution
900  sprintf_s(szApp, MAXCHARBUFFER, "\n Resolution %d dpi; ", (DWORD)pParameters->dwResolution);
901  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
902 
903 
904  // Image color depth
905  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
906  switch (pParameters->imageColorDepth)
907  {
909  {// Add parameter
910  sprintf_s(szApp, MAXCHARBUFFER, " Black and white 1 bpp; ");
911  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
912  break;
913  }
915  {// Add parameter
916  sprintf_s(szApp, MAXCHARBUFFER, " Blue channel 1 bpp; ");
917  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
918  break;
919  }
921  {// Add parameter
922  sprintf_s(szApp, MAXCHARBUFFER, " Blue channel 8 bpp; ");
923  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
924  break;
925  }
927  {// Add parameter
928  sprintf_s(szApp, MAXCHARBUFFER, " Color 24 bpp; ");
929  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
930  break;
931  }
933  {// Add parameter
934  sprintf_s(szApp, MAXCHARBUFFER, " Color 24 bpp + ultraviolet ; ");
935  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
936  break;
937  }
939  {// Add parameter
940  sprintf_s(szApp, MAXCHARBUFFER, " Green channel 1 bpp; ");
941  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
942  break;
943  }
945  {// Add parameter
946  sprintf_s(szApp, MAXCHARBUFFER, " Green channel 8 bpp; ");
947  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
948  break;
949  }
951  {// Add parameter
952  sprintf_s(szApp, MAXCHARBUFFER, " Grey 8 bpp; ");
953  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
954  break;
955  }
957  {// Add parameter
958  sprintf_s(szApp, MAXCHARBUFFER, " Red channel 1 bpp; ");
959  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
960  break;
961  }
963  {// Add parameter
964  sprintf_s(szApp, MAXCHARBUFFER, " Red channel 8 bpp; ");
965  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
966  break;
967  }
969  {// Add parameter
970  sprintf_s(szApp, MAXCHARBUFFER, " Ultraviolet channel 1 bpp; ");
971  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
972  break;
973  }
975  {// Add parameter
976  sprintf_s(szApp, MAXCHARBUFFER, " Ultraviolet channel 8 bpp; ");
977  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
978  break;
979  }
980  default:
981  {// Add parameter
982  sprintf_s(szApp, MAXCHARBUFFER, " Image color depth: parameter 0x%4X not recognised! ", (WORD)(pParameters->imageColorDepth));
983  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
984  break;
985  }
986  }
987 
988  // Image file format
989  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
990  switch (pParameters->imageOutFormat)
991  {
993  {// Add parameter
994  sprintf_s(szApp, MAXCHARBUFFER, " TIFF - no compression; ");
995  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
996  break;
997  }
999  {// Add parameter
1000  sprintf_s(szApp, MAXCHARBUFFER, " BMP; ");
1001  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1002  break;
1003  }
1004  case ImageFileFormat::Raw:
1005  {// Add parameter
1006  sprintf_s(szApp, MAXCHARBUFFER, " RAW; ");
1007  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1008  break;
1009  }
1010  case ImageFileFormat::Jpeg:
1011  {// Add parameter
1012  sprintf_s(szApp, MAXCHARBUFFER, " JPG, \n Quality %d; ", pParameters->dwJpgQuality);
1013  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1014  break;
1015  }
1017  {// Add parameter
1018  sprintf_s(szApp, MAXCHARBUFFER, " JPG native, \n Quality %d; ", pParameters->dwJpgQuality);
1019  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1020  break;
1021  }
1022  case ImageFileFormat::Png:
1023  {// Add parameter
1024  sprintf_s(szApp, MAXCHARBUFFER, " PNG; ");
1025  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1026  break;
1027  }
1029  {// Add parameter
1030  sprintf_s(szApp, MAXCHARBUFFER, " TIFF - CCITT3 compression; ");
1031  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1032  break;
1033  }
1035  {// Add parameter
1036  sprintf_s(szApp, MAXCHARBUFFER, " TIFF - CCITT4 compression; ");
1037  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1038  break;
1039  }
1041  {// Add parameter
1042  sprintf_s(szApp, MAXCHARBUFFER, " TIFF - RLE compression; ");
1043  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1044  break;
1045  }
1047  {// Add parameter
1048  sprintf_s(szApp, MAXCHARBUFFER, " TIFF - LZW compression; ");
1049  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1050  break;
1051  }
1052  }
1053 
1054 
1055  // Software crop and deskewing
1056  sprintf_s(szApp, MAXCHARBUFFER, "\n Software crop and deskewing %s; ", pParameters->bCropDeskewing ? "ENABLE" : "DISABLE");
1057  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1058 
1059 
1060  // Hardware deskewing
1061  sprintf_s(szApp, MAXCHARBUFFER, "\n Hardware deskewing %s; ", pParameters->bHardwareDeskewing ? "ENABLE" : "DISABLE");
1062  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1063 
1064  // Form standing
1065  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
1066  switch (pParameters->formStandingAfterScan)
1067  {
1069  {// Add parameter
1070  sprintf_s(szApp, MAXCHARBUFFER, " Drive forward.");
1071  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1072  break;
1073  }
1075  {// Add parameter
1076  sprintf_s(szApp, MAXCHARBUFFER, " Drive backward.");
1077  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1078  break;
1079  }
1081  {// Add parameter
1082  sprintf_s(szApp, MAXCHARBUFFER, " Hold ticket");
1083  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1084  break;
1085  }
1086  }
1087 
1088  // Double sheet detection
1089  sprintf_s(szApp, MAXCHARBUFFER, "\n Double sheet detection: ");
1090  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1091  switch (pParameters->doubleSheetDetection)
1092  {
1094  {// Add parameter
1095  sprintf_s(szApp, MAXCHARBUFFER, " Off.");
1096  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1097  break;
1098  }
1100  {// Add parameter
1101  sprintf_s(szApp, MAXCHARBUFFER, " Level 1.");
1102  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1103  break;
1104  }
1106  {// Add parameter
1107  sprintf_s(szApp, MAXCHARBUFFER, " Level 2.");
1108  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1109  break;
1110  }
1112  {// Add parameter
1113  sprintf_s(szApp, MAXCHARBUFFER, " Level 3.");
1114  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1115  break;
1116  }
1118  {// Add parameter
1119  sprintf_s(szApp, MAXCHARBUFFER, " Level 4.");
1120  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1121  break;
1122  }
1123  }
1124 
1125  // Paper held back detection
1126  sprintf_s(szApp, MAXCHARBUFFER, "\n Paper held back detection: ");
1127  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1128  switch (pParameters->paperHeldBackDetection)
1129  {
1131  {// Add parameter
1132  sprintf_s(szApp, MAXCHARBUFFER, " Off.");
1133  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1134  break;
1135  }
1137  {// Add parameter
1138  sprintf_s(szApp, MAXCHARBUFFER, " On.");
1139  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1140  break;
1141  }
1142  }
1143 
1144  // Brightness
1145  sprintf_s(szApp, MAXCHARBUFFER, "\n Brightness %d; ", pParameters->nBrightness);
1146  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1147 
1148  // Automatically delete images on library
1149  sprintf_s(szApp, MAXCHARBUFFER, "\n Keep last image available %s; ", pParameters->bKeepLastImageInMemory ? "TRUE" : "FALSE");
1150  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1151 
1152  //If > 0, Indicates the number of movement to do before start the scan
1153  sprintf_s(szApp, MAXCHARBUFFER, "\n Number of movement to do before start %d; ", pParameters->nRetryMovementBeforeStartScan);
1154  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1155 
1156  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
1157  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
1158 
1159 }
1160 
1161 
1169 static void LedBarParametersToStringA(LedBarSetting* pParameters, char* szBufferOut, DWORD dwBuffCharSize)
1170 {
1171  char szApp[MAXCHARBUFFER];
1172  ZeroMemory(szApp, sizeof(szApp));
1173 
1174  if (pParameters == NULL || szBufferOut == NULL)
1175  {
1176  return;
1177  }
1178 
1179  // Create string
1180  strcpy_s(szBufferOut, dwBuffCharSize, "Led bar parameters:\n ");
1181 
1182  // Add all parameters
1183  //
1184  // Led channel
1185  sprintf_s(szApp, MAXCHARBUFFER, "\n Channel:");
1186  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1187  if (pParameters->dwLedChannel & LedBarChannel::Channel_1)
1188  {
1189  sprintf_s(szApp, MAXCHARBUFFER, " 1, ");
1190  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1191  }
1192  if (pParameters->dwLedChannel & LedBarChannel::Channel_2)
1193  {
1194  sprintf_s(szApp, MAXCHARBUFFER, " 2, ");
1195  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1196  }
1197  if (pParameters->dwLedChannel & LedBarChannel::Channel_3)
1198  {
1199  sprintf_s(szApp, MAXCHARBUFFER, " 3, ");
1200  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1201  }
1202  if (pParameters->dwLedChannel & LedBarChannel::Channel_4)
1203  {
1204  sprintf_s(szApp, MAXCHARBUFFER, " 4, ");
1205  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1206  }
1207 
1208  // Led light
1209  sprintf_s(szApp, MAXCHARBUFFER, "\n Light: ");
1210  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1211  switch (pParameters->ledLight)
1212  {
1213  case LedBarLight::Off:
1214  {// Add parameter
1215  sprintf_s(szApp, MAXCHARBUFFER, " Off.");
1216  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1217  break;
1218  }
1219  case LedBarLight::On:
1220  {// Add parameter
1221  sprintf_s(szApp, MAXCHARBUFFER, " On.");
1222  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1223  break;
1224  }
1226  {// Add parameter
1227  sprintf_s(szApp, MAXCHARBUFFER, " Fast blinking.");
1228  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1229  break;
1230  }
1232  {// Add parameter
1233  sprintf_s(szApp, MAXCHARBUFFER, " Slow blinking.");
1234  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1235  break;
1236  }
1237  }
1238 
1239  // Reset previous
1240  sprintf_s(szApp, MAXCHARBUFFER, "\n Reset previous: %s; ", pParameters->bResetPreviousState ? "TRUE" : "FALSE");
1241  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1242 
1243  // RGB red color
1244  sprintf_s(szApp, MAXCHARBUFFER, "\n RGB red value: %d; ", pParameters->RGB_Led_RedValue);
1245  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1246 
1247  // RGB green color
1248  sprintf_s(szApp, MAXCHARBUFFER, "\n RGB green value: %d; ", pParameters->RGB_Led_GreenValue);
1249  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1250 
1251  // RGB blue color
1252  sprintf_s(szApp, MAXCHARBUFFER, "\n RGB blue value: %d; ", pParameters->RGB_Led_BlueValue);
1253  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1254 
1255 
1256  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
1257  strncat_s(szBufferOut, dwBuffCharSize, "\n", sizeof("\n"));
1258 
1259 }
1260 
1268 static void DeviceModelToStringA(DeviceModel deviceModel, char* szBufferOut, DWORD dwBuffCharSize)
1269 {
1270  char szApp[MAXCHARBUFFER];
1271  ZeroMemory(szApp, sizeof(szApp));
1272 
1273  if (szBufferOut == NULL)
1274  {
1275  return;
1276  }
1277 
1278  switch (deviceModel)
1279  {
1280  case DeviceModel::A4_Scanner: // A4 standard
1281  strcpy_s(szBufferOut, dwBuffCharSize, "A4 standard scanner");
1282  break;
1283  case DeviceModel::A6_Scanner: // A6 standard
1284  strcpy_s(szBufferOut, dwBuffCharSize, "A6 standard scanner");
1285  break;
1286  case DeviceModel::A4_216_Void_Scanner: // A4- scan 216 void
1287  strcpy_s(szBufferOut, dwBuffCharSize, "216 VOID scanner");
1288  break;
1289  case DeviceModel::A6_PRO_Scanner: // A6 pro
1290  strcpy_s(szBufferOut, dwBuffCharSize, "A6 PRO scanner");
1291  break;
1292  case DeviceModel::A4_Scan_A4SE: // A4- Scan A4-SE
1293  strcpy_s(szBufferOut, dwBuffCharSize, "Scan A4-SE");
1294  break;
1295  case DeviceModel::SCAN105: // SCAN105
1296  strcpy_s(szBufferOut, dwBuffCharSize, "SCAN105 scanner");
1297  break;
1298  case DeviceModel::KUBEIII_SCANNER: // KUBEIII Scanner
1299  strcpy_s(szBufferOut, dwBuffCharSize, "KUBEIII Scanner");
1300  break;
1301 
1302  default:
1303  strcpy_s(szBufferOut, dwBuffCharSize, "\n ");
1304  break;
1305  }
1306 }
1307 
1308 
1316 static void CropParametersToStringA(CropParametersStruct* pParameters, char* szBufferOut, DWORD dwBuffCharSize)
1317 {
1318  char szApp[MAXCHARBUFFER];
1319  ZeroMemory(szApp, sizeof(szApp));
1320 
1321  if (pParameters == NULL || szBufferOut == NULL)
1322  {
1323  return;
1324  }
1325 
1326  // Create string
1327  strcpy_s(szBufferOut, dwBuffCharSize, "Crop / Deskew parameters: ");
1328 
1329  // Add all parameters
1330  //
1331  // RGB red color
1332  sprintf_s(szApp, MAXCHARBUFFER, "\n Threshold: %d; ", pParameters->bCropThreshold);
1333  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1334 
1335  // Crop Quality
1336  sprintf_s(szApp, MAXCHARBUFFER, "\n Crop Precision:");
1337  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1338  switch (pParameters->cropPrecision)
1339  {
1340  case CropPrecision::LOW:
1341  {// Add parameter
1342  sprintf_s(szApp, MAXCHARBUFFER, " Low.");
1343  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1344  break;
1345  }
1346  case CropPrecision::NORMAL:
1347  {// Add parameter
1348  sprintf_s(szApp, MAXCHARBUFFER, " Normal.");
1349  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1350  break;
1351  }
1352  case CropPrecision::HIGHT:
1353  {// Add parameter
1354  sprintf_s(szApp, MAXCHARBUFFER, " Hight.");
1355  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1356  break;
1357  }
1359  {// Add parameter
1360  sprintf_s(szApp, MAXCHARBUFFER, " Very Hight.");
1361  strncat_s(szBufferOut, dwBuffCharSize, szApp, (dwBuffCharSize - strnlen(szBufferOut, dwBuffCharSize) + 1));
1362  break;
1363  }
1364  }
1365 }
1366 
1367 #pragma pack()
1368 
1369 #endif
1370 
1371 
1372 
BYTE nRetryMovementBeforeStartScan
If > 0, Indicates the number of movement to do before start the scan. Default value is 0.
Definition: dss_types.h:666
A6 scanner.
Definition: dss_types.h:339
Definition: dss_types.h:537
Blue.
Definition: dss_types.h:272
Definition: dss_types.h:517
Definition: dss_types.h:501
GREEN channel - 1 bit per pixel black and white.
Definition: dss_types.h:218
Definition: dss_types.h:676
Definition: dss_types.h:88
ScannerType PaperMaxSize
Scanner type, scanner scan size.
Definition: dss_types.h:767
KUBEIII SCANNER.
Definition: dss_types.h:372
Definition: dss_types.h:190
FormStanding
Indicates where the paper form will be driven after the scan job.
Definition: dss_types.h:152
Tiff image with LZW compression.
Definition: dss_types.h:297
Definition: dss_types.h:765
LedBarLight
Definition: dss_types.h:436
FormStanding formStandingAfterScan
Select the behaviour of the paper sheet after scan. Select whether to return backward to the user,...
Definition: dss_types.h:649
Back/Down side. Not allowed as a single choice.
Definition: dss_types.h:254
Definition: dss_types.h:552
ULTRAVIOLET channel - 1 bit per pixel black and white.
Definition: dss_types.h:227
Channel 2. Central green leds.
Definition: dss_types.h:424
BYTE bPeakFilter
Definition: dss_types.h:713
Front/Up side.
Definition: dss_types.h:251
Red.
Definition: dss_types.h:266
DeviceModel deviceModel
Scanner model and board.
Definition: dss_types.h:589
Definition: dss_types.h:404
Definition: dss_types.h:522
GREEN channel - 8 bit per pixel grey scale image.
Definition: dss_types.h:203
A4 scanner.
Definition: dss_types.h:336
Definition: dss_types.h:399
Definition: dss_types.h:180
BOOL bPaperHeldBackCap
"Paper sheet has been held back" sensor installed
Definition: dss_types.h:779
ImageFileFormat imageFormat
Image file format.
Definition: dss_types.h:693
Turn ON the double/multiple sheet detection, using VERY LOW sensor sensitivity (Only supported by Dev...
Definition: dss_types.h:470
BYTE RGB_Led_BlueValue
Blue color value. Only for RGB led bar. This parameter is ignored if the led bar is not RGB.
Definition: dss_types.h:617
int nBrightness
Indicates a value for brightness. Default value is 0. The brightness can be both positive (brighter i...
Definition: dss_types.h:658
Tiff image with CCITT4 compression.
Definition: dss_types.h:300
Turn ON the led bar.
Definition: dss_types.h:442
BOOL bDoubleMotor
Double motor installed on the scanner.
Definition: dss_types.h:803
DeviceModel
Definition: dss_types.h:348
DeviceModel ScannerModel
Scanner device model.
Definition: dss_types.h:836
unsigned int uint32
Service type definition.
Definition: dss_types.h:69
DWORD dwImageWidth
Image width, in pixels.
Definition: dss_types.h:684
LogVerbosity
Log verbosity. Set library log verbosity using InitLibrary
Definition: dss_types.h:83
Definition: dss_types.h:162
LedBarLight ledLight
Led light. Used to select whether to turn ON / OFF the led bar, or set it to slowly blink or quickly ...
Definition: dss_types.h:605
ImageResolution dwResolution
Image resolution.
Definition: dss_types.h:631
PaperHeldBackDetectionOpt
Definition: dss_types.h:477
Definition: dss_types.h:384
BYTE bADCThreshold
Definition: dss_types.h:727
DWORD dwImageHeight
Image height, in pixels.
Definition: dss_types.h:687
Definition: dss_types.h:505
Green.
Definition: dss_types.h:269
Definition: dss_types.h:130
Error list and description.
BOOL bHardwareDeskewingSupported
Hardware deskewing supported by the scanner.
Definition: dss_types.h:827
static void CropParametersToStringA(CropParametersStruct *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
Definition: dss_types.h:1316
Turn OFF the double/multiple sheet detection.
Definition: dss_types.h:458
Png image.
Definition: dss_types.h:306
24 bit per pixel color image + ULTRAVIOLET channel.
Definition: dss_types.h:233
Raw image. The image will be saved from up-left to down-right. For 1 bpp, value 0 means black,...
Definition: dss_types.h:291
No working parameter enabled.
Definition: dss_types.h:493
Tiff image without compression.
Definition: dss_types.h:282
BOOL bCropDeskewing
If TRUE, a software crop and deskewing operation will be performed on the scanned image....
Definition: dss_types.h:643
Definition: dss_types.h:103
Definition: dss_types.h:562
ScannerPrintDensity
Scanner print density. Only for scanners that support print option
Definition: dss_types.h:512
ScannerType scannerType
Scanner type.
Definition: dss_types.h:586
No paper upon the sensor.
Definition: dss_types.h:320
SCAN105 scanner.
Definition: dss_types.h:369
RED channel - 1 bit per pixel black and white.
Definition: dss_types.h:215
DWORD dwJpgQuality
Output image quality. Allowed values from 1 (minimum) to 100 (maximum). Default value:80.
Definition: dss_types.h:640
SensorStatus
Definition: dss_types.h:317
static void ScanParametersToStringA(ScanParametersStruct *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
Definition: dss_types.h:861
BOOL bResetPreviousState
Indicate whether to reset previous led state. Set to TRUE to reset the previous led state,...
Definition: dss_types.h:608
BOOL bMICRDataCMC7Reader
Reader for magnetic ink characters for CMC 7 standard installed on the scanner.
Definition: dss_types.h:809
Tiff image with RLE compression.
Definition: dss_types.h:294
DoubleSheetDetectOpt
Definition: dss_types.h:455
Definition: dss_types.h:626
Definition: dss_types.h:497
Definition: dss_types.h:98
Definition: dss_types.h:118
#define MAXCHARBUFFER
Lenght, in characters, of a standard string.
Definition: dss_types.h:50
BYTE RGB_Led_GreenValue
Green color value. Only for RGB led bar. This parameter is ignored if the led bar is not RGB.
Definition: dss_types.h:614
Turn ON the paper held back detection (advised)
Definition: dss_types.h:483
GammaChannel
Definition: dss_types.h:263
ImageResolution
Definition: dss_types.h:379
Paper Handler.
Definition: dss_types.h:363
short int16
Service type definition.
Definition: dss_types.h:61
ImageFileFormat
Definition: dss_types.h:279
8 bit per pixel grey scale image
Definition: dss_types.h:212
Definition: dss_types.h:409
unsigned short uint16
Service type definition.
Definition: dss_types.h:67
PaperHeldBackDetectionOpt paperHeldBackDetection
Set whether to stop the scan job if the user holds back the paper, or not. Advised value: PaperHeldBa...
Definition: dss_types.h:655
BOOL bRGBLedBar
RGB led bar installed on the scanner.
Definition: dss_types.h:821
Definition: dss_types.h:572
Definition: dss_types.h:108
Definition: dss_types.h:167
1 bit per pixel black and white image
Definition: dss_types.h:224
ScanSide nScanSide
Which scan side the image is referred to.
Definition: dss_types.h:696
char int8
Service type definition.
Definition: dss_types.h:59
BYTE bCropThreshold
Definition: dss_types.h:752
Channel 1. Central red leds.
Definition: dss_types.h:421
BOOL bHardwareDeskewing
If TRUE, the scanner automatically performs an hardware deskewing operation on the paper form (advise...
Definition: dss_types.h:646
static void DeviceModelToStringA(DeviceModel deviceModel, char *szBufferOut, DWORD dwBuffCharSize)
Definition: dss_types.h:1268
FormMovement
Indicates the paper form movement
Definition: dss_types.h:175
Definition: dss_types.h:145
unsigned char uint8
Service type definition.
Definition: dss_types.h:65
Jpeg image.
Definition: dss_types.h:288
Definition: dss_types.h:394
LedBarChannel
Definition: dss_types.h:418
Definition: dss_types.h:547
ImageColorDepthType imageDepth
Image color depth.
Definition: dss_types.h:690
Turn OFF the led bar.
Definition: dss_types.h:439
Turn ON the double/multiple sheet detection, using VERY HIGH sensor sensitivity.
Definition: dss_types.h:461
ImageColorDepthType imageColorDepth
Image color depth.
Definition: dss_types.h:634
int int32
Service type definition.
Definition: dss_types.h:63
Definition: dss_types.h:542
Definition: dss_types.h:93
24 bit per pixel color image
Definition: dss_types.h:230
DWORD dwVid
Device USB Vendor ID (VID)
Definition: dss_types.h:577
Scan on Front/Up and Back/Down side.
Definition: dss_types.h:257
Native Jpeg image. Only supported by DeviceModel::A4_Scanner and DeviceModel::A6_PRO_Scanner.
Definition: dss_types.h:309
Led bar fast blinking.
Definition: dss_types.h:448
A4 scanner.
Definition: dss_types.h:351
BLUE channel - 1 bit per pixel black and white.
Definition: dss_types.h:221
CropPrecision
Indicates the Crop / Deskew precision.
Definition: dss_types.h:125
ScanSide
Definition: dss_types.h:248
DWORD dwDeviceID
Device ID. Unique ID used in almost all APIs to select the wanted device to communicate to.
Definition: dss_types.h:574
Channel 4. Green leds on edge.
Definition: dss_types.h:430
A6 scanner PRO.
Definition: dss_types.h:357
Definition: dss_types.h:599
Definition: dss_types.h:557
BOOL bCisDown
CIS DOWN installed on the scanner.
Definition: dss_types.h:797
CropPrecision cropPrecision
Definition: dss_types.h:756
Led bar slow blinking.
Definition: dss_types.h:445
Scan 216 void.
Definition: dss_types.h:360
Definition: dss_types.h:185
16 bit per pixel grey scale image. Not supported. Do not use
Definition: dss_types.h:236
Definition: dss_types.h:157
Definition: dss_types.h:708
DWORD dwPid
Device USB Product ID (PID)
Definition: dss_types.h:580
Definition: dss_types.h:135
Turn ON the double/multiple sheet detection, using HIGH sensor sensitivity (Only supported by DeviceM...
Definition: dss_types.h:464
BYTE RGB_Led_RedValue
Red color value. Only for RGB led bar. This parameter is ignored if the led bar is not RGB.
Definition: dss_types.h:611
BOOL bCisUp
CIS UP installed on the scanner.
Definition: dss_types.h:791
ImageColorDepthType
Definition: dss_types.h:197
Turn ON the double/multiple sheet detection, using LOW sensor sensitivity (Only supported by DeviceMo...
Definition: dss_types.h:467
ImageResolution imageResolution
Image resolution.
Definition: dss_types.h:699
DWORD dwLedChannel
Led channel/channels. More than one value of LedBarChannel are allowed. Set OR between LedBarChannel ...
Definition: dss_types.h:602
ScannerType
Definition: dss_types.h:333
static BYTE ConvertImageColorDepthToBpp(ImageColorDepthType depthType)
Definition: dss_types.h:849
ScanSide wantedScanSide
Scan side: front, back or both.
Definition: dss_types.h:628
48 bit per pixel color image. Not supported. Do not use
Definition: dss_types.h:239
BOOL bLedBarPresent
A led bar is installed on the scanner.
Definition: dss_types.h:815
Turn OFF the paper held back detection (not advised)
Definition: dss_types.h:480
ULTRAVIOLET channel - 8 bit per pixel grey scale image.
Definition: dss_types.h:209
DWORD dwImageBufferSize
Size of bytImageBuffer. If the buffer allocated is too small, GetLastScanImageData returns DssResult_...
Definition: dss_types.h:681
A6 scanner.
Definition: dss_types.h:354
BOOL bCoverOpenSensor
"Cover open" sensor installed
Definition: dss_types.h:785
Definition: dss_types.h:532
Definition: dss_types.h:389
Sensor not available on this device.
Definition: dss_types.h:326
BOOL bDoubleSheetSensor
"Double sheet loaded" sensor installed
Definition: dss_types.h:773
BYTE bSpaceThreshold
Definition: dss_types.h:738
BYTE * bytImageBuffer
Buffer containing the image read by the scanner. Must have been allocated by the calling process.
Definition: dss_types.h:678
Definition: dss_types.h:527
BLUE channel - 8 bit per pixel grey scale image.
Definition: dss_types.h:206
RED channel - 8 bit per pixel grey scale image.
Definition: dss_types.h:200
WorkingParameter
Definition: dss_types.h:490
Tiff image with CCITT3 compression.
Definition: dss_types.h:303
Definition: dss_types.h:140
ImageFileFormat imageOutFormat
Output image file format.
Definition: dss_types.h:637
Channel 3. Red leds on edge.
Definition: dss_types.h:427
Definition: dss_types.h:113
Bmp image.
Definition: dss_types.h:285
BOOL bKeepLastImageInMemory
Definition: dss_types.h:663
80mm scanner
Definition: dss_types.h:342
DoubleSheetDetectOpt doubleSheetDetection
To set whether to enable (advised) or disable double/multiple sheet detection. If Off,...
Definition: dss_types.h:652
uint32 DeviceID
Device ID used to select the device to connect to.
Definition: dss_types.h:72
The paper is upon the sensor.
Definition: dss_types.h:323
static void LedBarParametersToStringA(LedBarSetting *pParameters, char *szBufferOut, DWORD dwBuffCharSize)
Definition: dss_types.h:1169
Scan A4-SE.
Definition: dss_types.h:366
Definition: dss_types.h:747